///		PASTORAL CONFLICTS AND (DIS)TRUST: EVIDENCE FROM NIGERIA USING AN INSTRUMENTAL VARIBLE APPROACH
		
											*Daniel Tuki*

											
* This article is based on data from the Transnational Perspectives on Migration and Integration (TRANSMIT) research project. These data were collected in the Northern Nigerian state of Kaduna in 2021. For more information on the project visit: https://www.projekte.hu-berlin.de/en/transmit

* Note: Variable names are indicated in parenthesis




//										DEPENDENT VARIABLE
	
** Distrust Fulani(trust_fulani): This variable measures the degree to which respondents trust members of the Fulani ethnic group on a scale with five ordinal categories ranging from, "0 = Trust completely" to "4 = Do not trust at all."


** Distrust Muslims (trust_mus): This variable measures the degree to which respondents trust Muslims on a scale with five ordinal categories ranging from, "0 = Trust completely" to "4 = Do not trust at all."




//	 									EXPLANATORY VARIABLE
	
* Pastoral conflict (fp_all_10km): This variable measures the total number of pastoral conflicts that occurred within a 10 km buffer around respondents' geolocations between 1997 to 2020. The variable was construsted using QGIS software by leveraging the geocoded information provided in the TRANSMIT survey data and data from the Armed Conflict Location and Events Data project (ACLED). To access the ACLED dataset visit: https://acleddata.com/

* Pastoral conflict (1 fatality) (fp_1_fatal_10km): This variable measures the pastoral conflicts that occured within a 10km buffer around the respondents' geolocations, and which had caused at least one fatality. I used this variable to conduct a robustnesss check. 




//										CONTROL VARIABLES
	
* Victimization (vioaffected): This is a dummy variable that takes a value of 1 if a respondent or household member had experienced any form of violence during the past decade and 0 otherwise. 


* Household income (hhecon): This variable measures the income of the household to which respondents belong on an ordinal scale.


* Muslim affiliation (relig): This is a dummy variable that takes the value of 1 if the respondent is Muslim and 0 if Christian. All respondents in the sample were either Muslim or Christian. 
	
	
* Gender (gender1): This is a dummy variable that takes the value of 1 if the respondent is female, and 0 if male. 

* Age (age1): This variable is measured in years.




//										INSTRUMENTAL VARIABLES
	
* Distance to State Governor's house (dist_gov_house): This measures the distance from the respondents' geolocations to the state governor's residence in kilometers and as crow flies. 


* SPEI drought index (spei_1997_2020_3_month): This measures the incidence of drought around the respondents' geolocations.


//										OTHER DESCRIPTIVE VARIABLES

* Ethnic group (ethnic): This indicates the ethnic group to the which respondents belong. 




//										DESCRIPTIVE STATISTICS

// Tables 1 : Summary Statistics 	

summ trust_fulani trust_mus fp_all_10km fp_1_fatal_10km vioaffected hhecon relig gender1 age1 spei_1997_2020_3_month dist_gov_house




//										REGRESSION RESULTS

//	Table 2: Association between the explanatory and instrumental variables

*Model 1: OLS - baseline - Drought
regress fp_all_10km spei_1997_2020_3_month
*To obtain the AIC statistics
estat ic

*Model 2: OLS - baseline - State capacity
regress fp_all_10km dist_gov_house
*To obtain the AIC statistics
estat ic

*Model 3: OLS - both instrumental variables
regress fp_all_10km spei_1997_2020_3_month dist_gov_house
*To obtain the AIC statistics
estat ic

*Model 4: OLS - Adding control variables
regress fp_all_10km spei_1997_2020_3_month dist_gov_house vioaffected hhecon relig gender1 age1 
*To obtain the AIC statistics
estat ic




//	Table 3: Effect of pastoral conflict on distrust in members of the Fulani ethnic group

* Model 1: Baseline model
eoprobit trust_fulani, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house)
* To obtain the AIC statistics
estat ic

*Model 2: Adding control variables
eoprobit trust_fulani vioaffected hhecon relig gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house)
*To obtain the AIC statistics
estat ic

* Model 3: - Using the Muslim subsample
eoprobit trust_fulani vioaffected hhecon gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house), if relig == 1
* To obtain the AIC statistics
estat ic

* Model 4: Using the Christian subsample
eoprobit trust_fulani vioaffected hhecon gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house), if relig == 0 
* To obtain the AIC statistics
estat ic


//	Figure 6: Average marginal effects of pastoral conflict on distrust in the Fulani
* Panel A: Full sample (Based on Model 2 in Table 3)
eoprobit trust_fulani vioaffected hhecon relig gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house)
* To obtain the marginal effects of pastoral conflicts: 
margins, dydx(fp_all_10km)
*To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (full_distrust_fulani, replace)

* Panel B: Muslims (Based on Model 3 in Table 3)
eoprobit trust_fulani vioaffected hhecon gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house), if relig == 1
* To obtain the marginal effects of pastoral conflicts: 
margins, dydx(fp_all_10km)
*To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (muslim_distrust_fulani, replace)

* Panel C: Christians (Based on Model 4 in Table 3)
eoprobit trust_fulani vioaffected hhecon gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house), if relig == 0 
* To obtain the marginal effects of pastoral conflicts: 
margins, dydx(fp_all_10km)
*To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (christ_distrust_fulani, replace)




//	Table 4: Effect of pastoral conflict on distrust in Muslims

* Model 1: Baseline model
eoprobit trust_mus, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house)
* To obtain the AIC statistics
estat ic

* Model 2: Adding control variables
eoprobit trust_mus vioaffected hhecon relig gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house)
* To obtain the AIC statistics
estat ic

* Model 3: Using Muslim subsample
eoprobit trust_mus vioaffected hhecon gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house), if relig == 1
* To obtain the AIC statistics
estat ic

* Model 4: Using Christian subsample
eoprobit trust_mus vioaffected hhecon gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house), if relig == 0 
* To obtain the AIC statistics
estat ic



//	Figure 7: Average marginal effects of pastoral conflict on distrust in Muslims
* Panel A: Full sample (Based on Model 2 in Table 4)
eoprobit trust_mus vioaffected hhecon relig gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house)
* To obtain the marginal effects of pastoral conflicts: 
margins, dydx(fp_all_10km)
*To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (full_distrust_mus, replace)

* Panel B: Muslims (Based on Model 3 in Table 4)
eoprobit trust_mus vioaffected hhecon gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house), if relig == 1
* To obtain the marginal effects of pastoral conflicts: 
margins, dydx(fp_all_10km)
*To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (muslim_distrust_mus, replace)

* Panel C: Christians (Based on Model 4 in Table 4)
eoprobit trust_mus vioaffected hhecon gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house), if relig == 0 
* To obtain the marginal effects of pastoral conflicts: 
margins, dydx(fp_all_10km)
*To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (christ_distrust_mus, replace)






//											APPENDIX

// SECTION A: Robustness checks using pastoral conflicts within the 10 km radius that caused at least 1 fatality

// Table A1: Replicating the results in Table 2 using only conflicts that caused at least one fatality

* Model 1: OLS - baseline - Drought
regress fp_1_fatal_10km spei_1997_2020_3_month
* To obtain the AIC statistics
estat ic 

* Model 2: OLS - baseline - State capacity
regress fp_1_fatal_10km dist_gov_house
* To obtain the AIC statistics
estat ic 

* Model 3: OLS - both instrumental variables
regress fp_1_fatal_10km spei_1997_2020_3_month dist_gov_house
* To obtain the AIC statistics
estat ic 

* Model 4: OLS - Adding control variables
regress fp_1_fatal_10km spei_1997_2020_3_month dist_gov_house vioaffected hhecon relig gender1 age1 




// Table A2: Replicating the results in Table 3 using only pastoral conflicts that caused at least one fatality (Fulani)

* Model 1: Baseline model
eoprobit trust_fulani, endog(fp_1_fatal_10km = spei_1997_2020_3_month dist_gov_house)
* To obtain the AIC statistics
estat ic

*Model 2: Adding control variables
eoprobit trust_fulani vioaffected hhecon relig gender1 age1, endog(fp_1_fatal_10km = spei_1997_2020_3_month dist_gov_house)
*To obtain the AIC statistics
estat ic

* Model 3: - Using the Muslim subsample
eoprobit trust_fulani vioaffected hhecon gender1 age1, endog(fp_1_fatal_10km = spei_1997_2020_3_month dist_gov_house), if relig == 1
* To obtain the AIC statistics
estat ic

* Model 4: Using the Christian subsample
eoprobit trust_fulani vioaffected hhecon gender1 age1, endog(fp_1_fatal_10km = spei_1997_2020_3_month dist_gov_house), if relig == 0 
* To obtain the AIC statistics
estat ic




// Table A3: Replicating the results in Table 4 using only pastoral conflicts that caused at least one fatality (Muslims)

* Model 1: Baseline model
eoprobit trust_mus, endog(fp_1_fatal_10km = spei_1997_2020_3_month dist_gov_house)
* To obtain the AIC statistics
estat ic

*Model 2: Adding control variables
eoprobit trust_mus vioaffected hhecon relig gender1 age1, endog(fp_1_fatal_10km = spei_1997_2020_3_month dist_gov_house)
*To obtain the AIC statistics
estat ic

* Model 3: - Using the Muslim subsample
eoprobit trust_mus vioaffected hhecon gender1 age1, endog(fp_1_fatal_10km = spei_1997_2020_3_month dist_gov_house), if relig == 1
* To obtain the AIC statistics
estat ic

* Model 4: Using the Christian subsample
eoprobit trust_mus vioaffected hhecon gender1 age1, endog(fp_1_fatal_10km = spei_1997_2020_3_month dist_gov_house), if relig == 0 
* To obtain the AIC statistics
estat ic




// SECTION B: Robustness checks using 2SLS as an alternative estimation method

// Table B1: Replicating the results in Table 3 using 2SLS (Fulani)

*Model 1: Baseline model
ivregress 2sls trust_fulani (fp_all_10km = spei_1997_2020_3_month dist_gov_house)
*To test for overidentifying restrictions: 
estat overid
*To test for endogeneity: 
estat endog
*To obtain the F-statistics for the first-stage regression: 
estat first

*Model 2: Adding control variables
ivregress 2sls trust_fulani vioaffected hhecon relig gender1 age1 (fp_all_10km = spei_1997_2020_3_month dist_gov_house)
*To obtain the F-statistics for the first-stage regression: 
estat first

*Model 3: - Using the Muslim subsample
ivregress 2sls trust_fulani vioaffected hhecon gender1 age1 (fp_all_10km = spei_1997_2020_3_month dist_gov_house) if relig == 1
*To obtain the F-statistics for the first-stage regression: 
estat first

*Model 4: Using the Christian subsample
ivregress 2sls trust_fulani vioaffected hhecon gender1 age1 (fp_all_10km = spei_1997_2020_3_month dist_gov_house) if relig == 0 
*To obtain the F-statistics for the first-stage regression: 
estat first




// Table B2: Replicating the results in Table 4 using 2SLS (Muslims)

*Model 1: Baseline model
ivregress 2sls trust_mus (fp_all_10km = spei_1997_2020_3_month dist_gov_house)
*To test for overidentifying restrictions: 
estat overid
*To test for endogeneity: 
estat endog
*To obtain the F-statistics for the first-stage regression: 
estat first

*Model 2: Adding control variables
ivregress 2sls trust_mus vioaffected hhecon relig gender1 age1 (fp_all_10km = spei_1997_2020_3_month dist_gov_house)
*To obtain the F-statistics for the first-stage regression: 
estat first

*Model 3: Using Muslim subsample
ivregress 2sls trust_mus vioaffected hhecon gender1 age1 (fp_all_10km = spei_1997_2020_3_month dist_gov_house) if relig == 1
*To obtain the F-statistics for the first-stage regression: 
estat first

*Model 4: Using Christian subsample
ivregress 2sls trust_mus vioaffected hhecon gender1 age1 (fp_all_10km = spei_1997_2020_3_month dist_gov_house) if relig == 0 
*To obtain the F-statistics for the first-stage regression: 
estat first




// SECTION C: Plotting the average marginal effect of religious affiliation on distrust

//	Figure C1: Average marginal effects of religious affiliation on distrust in the Fulani and Muslims

* Panel A: Full sample (Based on Model 2 in Table 3) [Fulani]
eoprobit trust_fulani vioaffected hhecon relig gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house)
* To obtain the marginal effects of pastoral conflicts: 
margins, dydx(relig)
*To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (full_relig_distrust_fulani, replace)

* Panel B: Full sample (Based on Model 2 in Table 4) [Fulani]
eoprobit trust_mus vioaffected hhecon relig gender1 age1, endog(fp_all_10km = spei_1997_2020_3_month dist_gov_house)
* To obtain the marginal effects of pastoral conflicts: 
margins, dydx(relig)
*To plot the marginal effects as a bar chart with confidence intervals
marginsplot, recast(bar) yline(0) name (full_relig_distrust_mus, replace)

* To combine the graphs from the two panels: 
graph combine full_relig_distrust_fulani full_relig_distrust_mus


